<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登录 - Alist-Sync 自动化同步系统</title>
    <link rel="stylesheet" href="https://s4.zstatic.net/ajax/libs/bootstrap/5.2.3/css/bootstrap.min.css">
    <link rel="stylesheet" href="https://s4.zstatic.net/ajax/libs/bootstrap-icons/1.11.3/font/bootstrap-icons.min.css">
    <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
    <style>
        .login-container {
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .login-card {
            width: 100%;
            max-width: 450px;
            padding: 2rem;
        }
        
        .login-logo {
            font-size: 2.5rem;
            margin-bottom: 2rem;
        }
        
        .login-form .form-floating {
            margin-bottom: 1.5rem;
        }
        
        .login-form .form-floating input {
            border: 1px solid var(--border-color);
            height: 60px;
        }
        
        .login-form .form-floating label {
            padding-top: 1rem;
            color: var(--bs-secondary-color);
        }
        
        .tech-decoration {
            position: absolute;
            width: 150px;
            height: 150px;
            border: 2px solid var(--accent-color);
            border-radius: 50%;
            opacity: 0.1;
            z-index: -1;
        }
        
        .tech-decoration.top-right {
            top: -50px;
            right: -50px;
        }
        
        .tech-decoration.bottom-left {
            bottom: -50px;
            left: -50px;
        }
    </style>
</head>
<body class="bg-dark text-light">
    <div class="login-container">
        <div class="card login-card tech-border bg-dark">
            <div class="tech-decoration top-right"></div>
            <div class="tech-decoration bottom-left"></div>
            
            <div class="card-body">
                <div class="text-center mb-4">
                    <h1 class="login-logo">
                        <i class="bi bi-arrow-repeat text-primary"></i> Alist-Sync
                    </h1>
                    <p class="text-muted">自动化同步系统</p>
                </div>
                
                {% with messages = get_flashed_messages(with_categories=true) %}
                    {% if messages %}
                        {% for category, message in messages %}
                        <div class="alert alert-{{ category }} alert-dismissible fade show" role="alert">
                            {{ message }}
                            <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
                        </div>
                        {% endfor %}
                    {% endif %}
                {% endwith %}
                
                <form class="login-form" method="POST" action="{{ url_for('auth.login') }}">
                    <div class="form-floating">
                        <input type="text" class="form-control" id="username" name="username" placeholder="用户名" required>
                        <label for="username"><i class="bi bi-person-fill me-2"></i>用户名</label>
                    </div>
                    
                    <div class="form-floating">
                        <input type="password" class="form-control" id="password" name="password" placeholder="密码" required>
                        <label for="password"><i class="bi bi-key-fill me-2"></i>密码</label>
                    </div>
                    
                    <div class="d-grid gap-2 mt-4">
                        <button type="submit" class="btn btn-primary btn-lg py-3">
                            <i class="bi bi-box-arrow-in-right me-2"></i>登录
                        </button>
                    </div>
                </form>
                
                <div class="text-center mt-4 text-muted small">
                    <p>默认账号密码: admin/admin</p>
                    <p>© 2023 Alist-Sync</p>
                </div>
            </div>
        </div>
    </div>

    <script src="https://s4.zstatic.net/ajax/libs/bootstrap/5.2.3/js/bootstrap.bundle.min.js"></script>
</body>
</html> 